In a system for controlling an object to be controlled such as a machining device using a servo motor with a servo system controller having a sequence control section and a servo control section, when providing controls such as changing an operation pattern of the servo motor or an output signal to the object to be controlled in response to an event to the object to be controlled according to an input signal from outside or a fixed cycle event instructed by a timer in the sequence control section, a response time from detection of the event up to change of the operation pattern of the servo motor or change of the output signal, give basic influence over a tact time, and nonuniformity of the response time affect the machining precision. Especially, when it is necessary to raise the machining speed for shortening the tact time, the influence becomes remarkable, and for this reason it is strongly required to shorten and stabilize the response time.
FIG. 24 shows a conventional type of servo system controller having a sequence control section and a servo control section disclosed in Japanese Patent Laid-Open Publication No. HEI 2-146606. In FIG. 24, the reference numeral 1 indicates a basic body of the servo system controller, and the basic body 1 of the servo system controller has a sequence control section 2 and a servo control section 3.
The sequence control section 2 comprises a CPU 4 for sequence control, a control memory 5, an I/O interface 6, and an interface 7 for peripheral devices. An input unit 8 and an output unit 9, each as an object to be controlled, are connected to the I/O interface 6. The servo control section 3 comprises a CPU 10 for positioning control, a control memory 11, a servo program memory 12, and a servo interface 14. A servo system 21 including a servo motor is connected to the servo interface 14. The basic body 1 of the servo system controller has a common memory 100 comprising, for instance, a dual-port memory for delivery of information between the sequence control section 2 and the servo control section 3 as a memory shared by the sequence control section 2 and the servo control section 3.
As shown in FIG. 25, the common memory 100 has a device information area 100a, a starting area 100b, and a monitor area 100c.
Next description is made for operations. The CPU 4 for sequence control in the sequence control section 2 receives input information from an object to be controlled (not shown) via the I/O interface 6 from the input unit 8, scans and executes a sequence program in which input information, internal information and output information to the object to be controlled are described with parameters such as device names and register numbers, and outputs output information via the I/O interface 6 to the output unit 9 by repeating operations for updating the output information and internal information for providing sequence controls over the object to be controlled.
The sequence control section 2 writes a value for specified device information in the device information area 100a in the common memory 100 by executing the sequence program and also writes specified start information in the starting area 100b. The servo control section 3 monitors the starting area 100b in the common memory 100, reads, when specified start information is written in the starting area 100b, a value of the device information from the device information area 100a, executes a servo program stored in the servo program memory 12 according to the information, and provides positioning controls for the servo system 21 via the servo interface 14. If the start information written in the starting area 100b is information for starting execution of a servo program, the servo control section 3 starts execution of a specified servo program stored in the servo program memory 12 according to the device information written in the device information area 100a in the common memory 100.
The servo control memory 3 monitors device information for stopping a positioning operation in the device information area 100a in the common memory 100, and stops a servo motor in servo system 21, when information for instructing stop of a positioning operation is written, even if positioning control by the servo program has not completely been executed, and then terminates the positioning control. When the start information written in the starting area 100b in the common memory 100 is information for changing a positioning speed, the servo control section 3 changes the positioning speed according to the device information written in the device information area 100a, and restarts and continues execution of positioning control by the servo program in execution.
If the start information written in the starting area 100b in the common memory 100 is information for changing a torque limit value for a servo motor in the servo system 21, the servo control section 3 changes a torque limit value according to the device information written in the device information area 100a, and restarts and continues execution of positioning control by the servo program in execution. If the started servo program is for position-tracking control, the servo control section 3 refers to the device information area 100a in the common memory 100 once for every cycle for servo control, computes a target position according to the device information written in the sequence control section 2, and provides positioning controls for the servo system 21.
When the started servo program is for providing cancel/start controls, the servo control section 3 monitors device information for cancel instruction in the device information area 100a in the common memory 100, and interrupts, execution of the servo program when information is found instructing canceling of the program in execution, and starts execution of a servo program instructed to be started. When positioning is complete, the servo control section 3 stores information indicating completion in a monitor area 100a in the common memory 100. Also, during execution of positioning, data or error information is stored from time to time in the monitor area 100c.
It should be noted that the control memories 5, 11 are used for running the CPUs 4 and 10 respectively. A sequence program written via the interface 7 for peripheral devices from a peripheral device, is stored in the control memory 5, and a servo program written via the interface 7, for peripheral devices from a peripheral device, is stored in the servo program memory 12.
As described above, detection of an event in an object to be controlled is executed by scanning and executing a sequence program by the sequence control section 2.
In the servo system controller as described above, there occur problems (1) to (9) described below.
(1) As detection of an event in an object to be controlled is always executed by scanning and executing a sequence program with a sequence control section, it is necessary to shorten a scan time in the sequence control section for shortening a response time for detection of an event in the object to be controlled, thus a high performance CPU must be used, which results in cost increase.
(2) Events detected as input information from an object to be controlled include not only those to be responded at a high speed, but also those which may be responded at a low speed. However, in the conventional type of servo system controller, all events are detected by scanning and executing a sequence program in the sequence control section, so that it is impossible to provide controls at an optimal response speed according to control characteristics for each event.
(3) It is difficult to independently describe a control program according to control characteristics of each event to be detected as input information from the object to be controlled, so that the control program is difficult to understand.
(4) Time delay for scan time in the sequence control section is generated from a point of time when an event in an object to be controlled is detected in response to input information to the sequence control section up to a point of time when execution of a servo program is started in the servo control section, which prevents a tact time from being shortened.
(5) During execution of a positioning operation according to a servo program in a servo control section, delay for scan time in a sequence control section and nonuniformity are generated until an event in an object to be controlled is generated and a positioning speed is changed, so that compatibility between shortening of a tact time and improvement of the machining precision is difficult.
(6) During execution of a positioning operation according to a servo program in a servo control section, delay for scan time in a sequence control section and nonuniformity are generated until an event in an object to be controlled is generated and a torque limit value is changed, so that compatibility between shortening of a tact time and improvement of the machining precision is difficult.
(7) When a servo program currently being executed is interrupted in the servo control section upon detection of an event in an object to be controlled and cancel/start control for starting another specified servo program is provided, time delay for a scan time in the sequence control section and nonuniformity are generated, so that compatibility between shortening of a tact time and improvement of the machining precision is difficult.
(8) Even if it is necessary to periodically refer to input information from an object to be controlled at a specified cycle, information is referred to by scanning and executing a sequence program in the sequence control section, so that it is difficult to periodically refer to input information at an optimal cycle according to control characteristics of each input information.
(9) When position-tracking control is executed in a servo control section, so that a positioning address is corrected according to a result of computing in a sequence control section, control with time resolution shorter than the scan time in the sequence control section can not be executed. Furthermore, as a scan cycle in the sequence control section is asynchronous to a control cycle in the servo control section, at what timing a result of computing is reflected to the servo control can not be identified, so that high precision machining at a high speed can not be executed.